<?php

class ClassLoader {
	public static function load($className, $value = null) {
		if ($className) {
			if ($value != null) {
				return new $className($value);
			} else {
				return new $className;
			}
		}
	}
	public static function invokeMethod($class, $methodName, $params = null) {
		if (method_exists($class, $methodName)) {
			$class->{$methodName}($params);
			return;
		}
		throw new Exception('Enable to load method ' . $methodName . ' from class ' . $class);
	}
}

?>